package org.dromara.hotel.domain.vo;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hotel.domain.TerHotelOrders;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 酒店订单视图对象 ter_hotel_orders
 *
 * @author xch
 * @date 2025-06-11
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TerHotelOrders.class)
public class TerHotelOrdersVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelProperty(value = "")
    private String id;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long userId;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long roomId;

    /**
     *
     */
    @ExcelProperty(value = "")
    private Long hotelId;

    /**
     * 入住开始日期
     */
    @ExcelProperty(value = "入住开始日期")
    private LocalDate startDate;

    /**
     * 入住结束日期
     */
    @ExcelProperty(value = "入住结束日期")
    private LocalDate endDate;

    /**
     * 总结
     */
    @ExcelProperty(value = "总结")
    private Integer totalPrice;

    /**
     * 状态枚举
     */
    @ExcelProperty(value = "状态枚举")
    private Integer orderStatus;

    /**
     * 订单状态
     */
    @ExcelProperty(value = "订单状态")
    private Integer paymentStatus;

    /**
     * 预付金额
     */
    @ExcelProperty(value = "预付金额")
    private Integer prepayAmount;

    /**
     * 入住人电话
     */
    @ExcelProperty(value = "入住人电话")
    private String mobile;

    /**
     * 优惠劵id
     */
    @ExcelProperty(value = "优惠劵id")
    private String couponId;

    /**
     * 支付方式（微信/支付宝）
     */
    @ExcelProperty(value = "支付方式", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "微=信/支付宝")
    private String paymentMethod;

    /**
     * 是否续订订单
     */
    @ExcelProperty(value = "是否续订订单")
    private String isRenew;

    /**
     * 优惠金额
     */
    @ExcelProperty(value = "优惠金额")
    private Long couponPrice;

    /**
     * 优惠时长
     */
    @ExcelProperty(value = "优惠时长")
    private Long couponHour;

    /**
     * 预计收入
     */
    @ExcelProperty(value = "预计收入")
    private Long revenue;

    /**
     * 钥匙id
     */
    @ExcelProperty(value = "钥匙id")
    private String keyId;

    /**
     * 门锁密钥
     */
    @ExcelProperty(value = "门锁密钥")
    private String doorKey;

    /**
     * 原续订id
     */
    @ExcelProperty(value = "原续订id")
    private String renewId;

    /**
     * 退款编号
     */
    @ExcelProperty(value = "退款编号")
    private String refundId;
    @ExcelProperty(value = "客户姓名")
    private String  name;
    @ExcelProperty(value = "预计到店时间")
    private String arrivalTime;
    @ExcelProperty(value = "入住房间编号")
    private String roomNo;
    private String roomType;
    private String hotelName;
    private String roomImgurl;
    private String longitude;
    private String latitude;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "roomImgurl")
    private String roomImgurlUrl;

    /**
     * 身份证图片
     */
    @ExcelProperty(value = "身份证图片")
    private String idCardurl;

    /**
     * 身份证图片Url
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "idCardurl")
    private String idCardurlUrl;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 优惠劵
     */
    @Data
    public static class Coupon {

        /**
         * 优惠劵编号
         */
        private Long id;
        /**
         * 优惠劵名
         */
        private String name;

        /**
         * 是否设置满多少金额可用，单位：分
         */
        private Integer usePrice;

        /**
         * 生效开始时间
         */
        private LocalDateTime validStartTime;
        /**
         * 生效结束时间
         */
        private LocalDateTime validEndTime;

        /**
         * 优惠卷类型
         */
        private Integer type;

        /**
         * 优惠卷类型
         */
        private Integer plateType;

        /**
         * 优惠小时
         */
        private Double hourCount;

        /**
         * 折扣百分比
         */
        private Integer discountPercent;
        /**
         * 优惠金额，单位：分
         */
        private Integer discountPrice;
        /**
         * 折扣上限，单位：分
         */
        private Integer discountLimitPrice;

        /**
         * 是否匹配
         */
        private Boolean match;
        /**
         * 不匹配的原因
         */
        private String mismatchReason;
        private LocalDateTime createTime;
        private LocalDateTime updateTime;
    }
}
